public class NewCaseVFCtlEx {
/*	
    static testMethod void testNewCaseVFCtlEx() {
        UT_SObjectFactory.InterconnectedSObjectsForMASP masp = 
            new UT_SObjectFactory.InterconnectedSObjectsForMASP(1);
        ApexPages.StandardController sc = new ApexPages.StandardController(masp.a);
        NewCaseVFCtlEx cx = new NewCaseVFCtlEx(sc);

        // Simulate command link click action to test Case create
        ApexPages.currentPage().getParameters().putAll( 
            new Map<String,String>{
                'renew_cp' => '1',
                'ent_id' => masp.eArr[0].Id,
                'asset_id' => ''
            }
        );
        PageReference pr = cx.NewPrepopCase();
        system.assertEquals(true,pr.getRedirect(),'PageRef for new case should be live');
    }

      public final SObject sobj;
      public NewCaseVFCtlEx(ApexPages.StandardController stdController) {
            this.sobj = stdController.getRecord();
      }
      
      private String strAccountPagePrepops() {
      		// TODO
      		return '';
      }
      private String strContactPagePrepops() {
			if(this.sobj.getSObjectType() != Contact.sObjectType) return '';
			String urlFrags = '';
			
			
           String idStr = (String)this.sobj.Id;
           urlFrags += 'cas3_lkid='+idStr.substring(0,idStr.length()-3);

      		String astr;
	        // asset_id is optional arg and applies only to Contact detail page version
	        try {
		        Asset ass = [select Id,Name from Asset where Id=:System.currentPageReference().getParameters().get('asset_id') ];
	        	urlFrags += 'ASSETID='+ass.Id + '&ASSETNAME' + ass.Name;
	        } catch(Exception ex) { 
	        	// Legal
	       	}
      		return urlFrags;
      }
      private String strAssetPagePrepops() {
      	// TODO
      	return '';
      }
      private String strEntPrepops(Entitlement__c e) {
        String strEId = (String)e.Id;
        strEId = strEId.substring(0,strEId.length()-3);        
        String entArgs = '&CF'+EntitlementList.getCaseEntitlementFieldId()+'_lkid='+strEId+'&CF'+EntitlementList.getCaseEntitlementFieldId()+'='+e.Name;
        return entArgs;
      }
      
    public PageReference NewPrepopCase(){
        System.assertNotEquals(null,System.currentPageReference().getParameters().get('ent_id'),'ent_id is required arg');
        Boolean bRenewCP = ('1' == System.currentPageReference().getParameters().get('renew_cp'));
        
        // ent_id is required arg so don't wrap in try
	    Entitlement__c e = [select Id, Name, Business_Hours__c, Case_Pack__c, Cases_Remaining__c, Renewal_Amount__c
	    	from Entitlement__c where Id=:System.currentPageReference().getParameters().get('ent_id') ];
        
        if(bRenewCP){              
            e.Cases_Remaining__c = e.Renewal_Amount__c;
            update e;
        }
        
        String CaseOrigin = '&cas11='+CaseStdFieldControl.GetDefaultPicklistValueFromCase().get(CaseStdFieldControl.PICKLIST_ORIGIN);
        String Status = '&cas7='+CaseStdFieldControl.GetDefaultPicklistValueFromCase().get(CaseStdFieldControl.PICKLIST_STATUS);
        String Priority = '&cas8='+CaseStdFieldControl.GetDefaultPicklistValueFromCase().get(CaseStdFieldControl.PICKLIST_PRIORITY);          
        
        PageReference p = new PageReference('/500/e?retURL=/'+this.sobj.Id+strEntPrepops(e)+strContactPagePrepops()+strAccountPagePrepops()+CaseOrigin+Status+Priority); //+EntFR+EntFW+EntRT);        
        p.setRedirect(true);
        return p;
        
    }   
*/
}